<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>评论管理</title>
    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/Theme1/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/Plugin/style/css/ace.min.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>评论管理</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
                            <i class="fa fa-wrench"></i>
                        </a>

                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>

                    <div class="ibox-content">
                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                            <tr>
                                <th>评论ID</th>
                                <th>用户</th>
                                <th>评论内容</th>
                                <th>评论等级</th>
                                <th>店铺</th>
                                <th>菜品</th>
                                <th>订单号</th>
                                <th>评论时间</th>
                                <th>审核状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="result" id="result">
                                <tr>
                                    <td>{$result.id}</td>
                                    <td>{$result.username}</td>
                                    <td>{$result.content}</td>
                                    <td>{$result.comment_level}</td>
                                    <td>{$result.store_name}</td>
                                    <td>{$result.dishes}</td>
                                    <td>{$result.order_no}</td>
                                    <td>{$result.add_time|date="Y-m-d H:i:s",###}</td>
                                    <td>
                                        &nbsp;<if condition="$result.examine eq 1">
                                        <font color="green">已通过审核</font>
                                        <elseif condition="$result.examine eq -1"/>
                                        <font color="red">未通过审核</font>
                                        <else/>
                                        <font color="aqua">待审核</font></if>
                                    </td>
                                    <td>
                                        <a title="审核" href="{:U('Admin/Comment/examine',array('id'=>$result['id']))}" class="btn btn-white btn-sm">审核</a>
                                        <a title="删除" style="text-decoration:none" class="ml-5" href="javascript:void(0);" onclick="subjectdel('{$result.id}')"><i class="glyphicon glyphicon-remove"></i></a>
                                    </td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                        <div class="pagination" style="margin:0px;">
                            {$page}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
    <script src="__PUBLIC__/Theme1/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/Theme1/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/Theme1/js/content.min.js?v=1.0.0"></script>
    <script src="__PUBLIC__/Theme1/js/plugins/iCheck/icheck.min.js"></script>
    <script >
        $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
        function subjectdel(id){
            var msg = "您真的确定要删除吗？";
            if(id){
                if (confirm(msg)==true){
                    window.location.href="__CONTROLLER__/del/id/"+id;
                }else{
                    return false;
                }
            }else{
                alert("id 不能为空,删除失败")
            }
        }
    </script>
</body>
</html>
